<!doctype html>
<link type="text/css" rel="stylesheet" href="../src/css/graph.css">
<link type="text/css" rel="stylesheet" href="css/lines.css">

<script src="../vendor/d3.v3.js"></script>
<script src="../rickshaw.js"></script>

<div id="chart"></div>
<div id="preview"></div>

<script>

var seriesData = [ [], [] ];
var random = new Rickshaw.Fixtures.RandomData(150);

for (var i = 0; i < 150; i++) {
	random.addData(seriesData);
}

var graph = new Rickshaw.Graph( {
	element: document.getElementById("chart"),
	renderer: 'area',
	series: [
		{
			data: seriesData[0],
			color: 'steelblue'
		}, {
			data: seriesData[1],
			color: 'lightblue'
		}
	]
} );

var resize = function() {
	graph.configure({
		width: window.innerWidth * 0.75,
		height: window.innerHeight * 0.75
	});
	graph.render();
}

var preview = new Rickshaw.Graph.RangeSlider.Preview({
	graph: graph,
	element: document.getElementById('preview')
});

window.addEventListener('resize', resize); 
resize();

</script>
